package com.web.cms.pan.message;

import com.blue.core.dict.UploadType;
import com.blue.validation.group.SaveModel;
import com.blue.validation.group.UpdateModel;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

/**
 * 文件数据请求内容
 * 
 * @author 代码由 blue-code 框架生成
 * @since 1.0 2018年04月09日
 */
 public class FileDataRequest implements Serializable
{
	private static final long serialVersionUID = 1L;
	
	@NotNull(groups = { UpdateModel.class }, message = "编号不能为空")
	@Null(groups={SaveModel.class}, message="编号必须为空")
	private Integer id; // 编号
	@NotNull(groups = {SaveModel.class}, message = "用户ID不能为空")
	private Integer userId; // 用户编号
	@NotBlank(groups = { SaveModel.class, UpdateModel.class }, message = "文件名称不能为空")
	@Size(min = 0, max = 200, groups = { SaveModel.class, UpdateModel.class }, message = "文件名称长度[0-200]")
	private String name; // 文件名称
	@NotBlank(groups = { SaveModel.class }, message = "文件标识不能为空")
	@Size(min = 0, max = 100, groups = { SaveModel.class, UpdateModel.class }, message = "文件标识长度[0-100]")
	private String key; // 文件标识
	@NotBlank(groups = { SaveModel.class }, message = "文件MIME不能为空")
	@Size(min = 0, max = 100, groups = { SaveModel.class, UpdateModel.class }, message = "文件MIME长度[0-100]")
	private String mimeType; // 文件MIME
	private Date createTime; // 创建时间
	private Integer count; // 引用次数
	private Integer size; // 文件大小
	private UploadType type; // 文件类型

	@NotNull(groups = {SaveModel.class}, message = "目录ID不能为空")
	private Integer folderId; // 目录编号
	
	public FileDataRequest()
	{
	}
	
	public Integer getId()
	{
		return this.id;
	}
	
	public void setId(Integer id)
	{
		this.id = id;
	}
	
	public String getName()
	{
		return this.name;
	}
	
	public void setName(String name)
	{
		this.name = name;
	}
	
	public String getKey()
	{
		return this.key;
	}
	
	public void setKey(String key)
	{
		this.key = key;
	}
	
	public String getMimeType()
	{
		return this.mimeType;
	}
	
	public void setMimeType(String mimeType)
	{
		this.mimeType = mimeType;
	}
	
	public Date getCreateTime()
	{
		return this.createTime;
	}
	
	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}
	
	public Integer getCount()
	{
		return this.count;
	}
	
	public void setCount(Integer count)
	{
		this.count = count;
	}
	
	public Integer getSize()
	{
		return this.size;
	}
	
	public void setSize(Integer size)
	{
		this.size = size;
	}
	
	public UploadType getType()
	{
		return this.type;
	}
	
	public void setType(UploadType type)
	{
		this.type = type;
	}

	public Integer getUserId()
	{
		return userId;
	}

	public void setUserId(Integer userId)
	{
		this.userId = userId;
	}

	public Integer getFolderId()
	{
		return folderId;
	}

	public void setFolderId(Integer folderId)
	{
		this.folderId = folderId;
	}
}
